package com.shiguiwu.springmybatis.spring.componentscan.annotation;

import org.springframework.core.annotation.AliasFor;
import org.springframework.stereotype.Component;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * @description: 自定义注解
 * @author: stone
 * @date: Created by 2021/9/28 17:31
 * @version: 1.0.0
 * @pakeage: com.shiguiwu.springmybatis.spring.componentscan.annotation
 */
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
//如果我们也想给bean去名字，必须引用spring的注解在这里
@Component
public @interface MyBean {

    @AliasFor(annotation = Component.class)
    String value() default "";
}
